#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

int main_0026(void)
{
    int min = 100;
    int max = 0;
    int v = 0;
    int sum = 0;
    for (int i = 0; i < 10; ++i) {
        cin >> v;
        sum += v;
        min = ::min(min, v);
        max = ::max(max, v);
    }

    cout << fixed << setprecision(3) << (sum - min - max) / 8.0;

    return 0;
}
